package com.lida.zwservice.controller;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.lida.commonuntils.R;
import com.lida.zwservice.entity.ProvinceRegionVo;
import com.lida.zwservice.entity.SysRegion;
import com.lida.zwservice.service.SysRegionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.ArrayList;
import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author LiDa
 * @since 2022-01-27
 */
@RestController
@RequestMapping("/zwservice/sys-region")
public class SysRegionController {

    @Autowired
    private SysRegionService region;

    @GetMapping("getregion/{ParentId}")
    public R getregion(@PathVariable String ParentId){
        List<ProvinceRegionVo> regionList=region.getregion(ParentId);

        return R.success().data("provincelist",regionList);
    }
}

